package com.service;


import com.dao.IGoodsDAO;
import com.domain.Goods;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsService implements IGoodsService{

    @Autowired
    private IGoodsDAO goodsDAO;

    @Override
    public List<Goods> findGoods() {
        return goodsDAO.findGoods();
    }

    @Override
    public Integer deleteById(Integer id) {
        return goodsDAO.deleteById(id);
    }

    @Override
    public Integer insertObject(Goods goods) {
        return goodsDAO.insertObject(goods);
    }

    @Override
    public Goods selectOne(Integer id) {
        return goodsDAO.selectOne(id);
    }

    @Override
    public Integer updateGoods(Goods goods) {
        return goodsDAO.updateGoods(goods);
    }

}
